//
// Decompiled by Jadx - 360ms
//
package s;

import android.app.Activity;
import android.view.View;
import androidx.activity.b;
import androidx.appcompat.app.t;
import cc.e;
import fi.w;
import fi.y;
import me.plusne.common.Http.Vote;
import me.plusne.common.Json.VoteSubmit;
import r.f;

public final class aa implements View.OnClickListener {
    public final ao a;
    public final e b;
    public final VoteSubmit c;
    public final w d;
    public final w e;
    public final int f;

    public aa(ao aoVar, e eVar, VoteSubmit voteSubmit, w wVar, w wVar2, int i) {
        this.a = aoVar;
        this.b = eVar;
        this.c = voteSubmit;
        this.d = wVar;
        this.e = wVar2;
        this.f = i;
    }

    @Override
    public final void onClick(View view) {
        f p;
        String str;
        w wVar = this.d;
        w wVar2 = this.e;
        int i = this.f;
        ao aoVar = this.a;
        aoVar.getClass();
        e eVar = this.b;
        String obj = eVar.b.getText().toString();
        String obj2 = eVar.a.getText().toString();
        boolean isEmpty = obj.isEmpty();
        Activity activity = aoVar.e;
        if (isEmpty) {
            p = b.p(activity);
            str = "请填写标题";
        } else if (obj.codePointCount(0, obj.length()) > 20) {
            p = b.p(activity);
            str = "标题不能超过20个字符";
        } else if (obj2.isEmpty()) {
            p = b.p(activity);
            str = "请填写功能描述";
        } else if (obj2.codePointCount(0, obj2.length()) > 100) {
            p = b.p(activity);
            str = "功能描述不能超过100个字符";
        } else {
            y.e(activity);
            String token = aoVar.a.getToken();
            VoteSubmit voteSubmit = this.c;
            int id = voteSubmit.getId();
            t.c().j(((Vote) dq.b.b(Vote.class)).updateFeature(token, id, obj, obj2).subscribeWith(new al(aoVar, aoVar.e, voteSubmit, obj, obj2, wVar, wVar2, i)));
            return;
        }
        p.l(str);
    }
}
